package lormi.meipin.entity;

import java.math.BigDecimal;
import java.util.Date;

import lormi.meipin.dto.CheckCodeDto;
import lormi.meipin.dto.RegMerChant;
import lormi.meipin.dto.RegTalent;

public class LoginLog {
    private Integer id;

    private Integer userid;

    private String deviceid;

    private String osname;

    private String version;

    private BigDecimal longitude;

    private BigDecimal latitude;

    private Date createtime;
    
    public LoginLog(CheckCodeDto checkCodeDto,Integer userId){
    	this.userid=userId;
    	this.deviceid=checkCodeDto.getDeviceid();
    	this.osname=checkCodeDto.getOsname();
    	this.version=checkCodeDto.getVersion();
    	this.longitude=checkCodeDto.getLongitude();
    	this.latitude=checkCodeDto.getLatitude();
    	this.createtime=new Date();
    }
    public LoginLog(RegMerChant regMerChant,Integer userId){
    	this.userid=userId;
    	this.deviceid=regMerChant.getDeviceid();
    	this.osname=regMerChant.getOsname();
    	this.version=regMerChant.getVersion();
    	this.longitude=regMerChant.getLongitude();
    	this.latitude=regMerChant.getLatitude();
    	this.createtime=new Date();
    }
    public LoginLog(RegTalent regTalent,Integer userId){
    	this.userid=userId;
    	this.deviceid=regTalent.getDeviceid();
    	this.osname=regTalent.getOsname();
    	this.version=regTalent.getVersion();
    	this.longitude=regTalent.getLongitude();
    	this.latitude=regTalent.getLatitude();
    	this.createtime=new Date();
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserid() {
        return userid;
    }

    public void setUserid(Integer userid) {
        this.userid = userid;
    }

    public String getDeviceid() {
        return deviceid;
    }

    public void setDeviceid(String deviceid) {
        this.deviceid = deviceid == null ? null : deviceid.trim();
    }

    public String getOsname() {
        return osname;
    }

    public void setOsname(String osname) {
        this.osname = osname == null ? null : osname.trim();
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version == null ? null : version.trim();
    }

    public BigDecimal getLongitude() {
        return longitude;
    }

    public void setLongitude(BigDecimal longitude) {
        this.longitude = longitude;
    }

    public BigDecimal getLatitude() {
        return latitude;
    }

    public void setLatitude(BigDecimal latitude) {
        this.latitude = latitude;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }
}